<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template intrusive_ptr</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.intrusive__ptr_8hpp" title="Header &lt;boost/interprocess/smart_ptr/intrusive_ptr.hpp&gt;">
<link rel="prev" href="classboost_1_1interprocess_1_1deleter.html" title="Class template deleter">
<link rel="next" href="intrusive__ptr_8hpp_1ad07d21c7071ac564f4a3b29a3128c871.html" title="Function template operator==">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1interprocess_1_1deleter.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.intrusive__ptr_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="intrusive__ptr_8hpp_1ad07d21c7071ac564f4a3b29a3128c871.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template intrusive_ptr</span></h2>
<p>boost::interprocess::intrusive_ptr</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.intrusive__ptr_8hpp" title="Header &lt;boost/interprocess/smart_ptr/intrusive_ptr.hpp&gt;">boost/interprocess/smart_ptr/intrusive_ptr.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="keyword">typename</span> VoidPointer<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">intrusive</span><span class="special">::</span><span class="identifier">pointer_traits</span><span class="special">&lt;</span> <span class="identifier">VoidPointer</span> <span class="special">&gt;</span><span class="special">::</span><span class="keyword">template</span> <span class="identifier">rebind_pointer</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a6c8c4b397971951b0d9defce0cad7bc8"></a><span class="identifier">pointer</span><span class="special">;</span>       <span class="comment">// Provides the type of the internal stored pointer. </span>
  <span class="keyword">typedef</span> <span class="identifier">T</span>                                                                                   <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a6323896a5b9a7643aa7fc4959189b9e4"></a><span class="identifier">element_type</span><span class="special">;</span>  <span class="comment">// Provides the type of the stored pointer. </span>

  <span class="comment">// <a class="link" href="../boost_container_header_reference/classboost_1_1container_1_1new__allocator.html#id63-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a3b062402a4f97267f3d5f6d02572d1da"><span class="identifier">intrusive_ptr</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a9d8a78cba6f87c3479c9d046832201f6"><span class="identifier">intrusive_ptr</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">bool</span> <span class="special">=</span> <span class="keyword">true</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a641487a6128954bc6852987e731a0383"><span class="identifier">intrusive_ptr</span></a><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a3dd69761f4ec2a6fa5558152cd7424c6"><span class="identifier">intrusive_ptr</span></a><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1aaa3f512bbda87d40b0ce835fc2bf1548"><span class="identifier">intrusive_ptr</span></a><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">VP</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a3ed6cfcd094205ffe569472d8bae51f3"><span class="special">~</span><span class="identifier">intrusive_ptr</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a5ac3ec09d78dc56855b1d4656d5ca95c"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="identifier">BOOST_COPY_ASSIGN_REF</span><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a><span class="special">)</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1ac84d23bf38a020c1d44611f52a2f1976"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> 
    <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a2502f5c7f5e962b4b7005b29b76f7cf2"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">VP</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a5476c22b7af008da57d744e8a52e1d32"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="identifier">pointer</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1ac1ffa4a3578eb390ee36368687052d28"><span class="identifier">reset</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">pointer</span> <span class="special">&amp;</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1aac625d6cbb898c0b754f13f49fc0961e"><span class="identifier">get</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="identifier">pointer</span> <span class="special">&amp;</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a35ad6abe1a924602938f6c02a94a72a8"><span class="identifier">get</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">T</span> <span class="special">&amp;</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a191709e971e939833998ee754329b025"><span class="keyword">operator</span><span class="special">*</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">const</span> <span class="identifier">pointer</span> <span class="special">&amp;</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1adeb444405c954b83524b181a8b8ef957"><span class="keyword">operator</span><span class="special">-&gt;</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">pointer</span> <span class="special">&amp;</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a506ca35c6bbaeb90616b2b72f63f1a53"><span class="keyword">operator</span><span class="special">-&gt;</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a6cbd046b6639ba32b21ab78b82cfb1a2"><span class="keyword">operator</span> <span class="identifier">unspecified_bool_type</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a4e1db57f5eedfbf20bf400bd1f293f67"><span class="keyword">operator</span><span class="special">!</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a9122b4d287f62a0a22a425189b37af28"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.16.19.3.49.4.4"></a><h2>Description</h2>
<p>The <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> class template stores a pointer to an object with an embedded reference count. <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> is parameterized on T (the type of the object pointed to) and VoidPointer(a void pointer type
that defines the type of pointer that intrusive_ptr will store). intrusive_ptr&lt;T, void &lt;em&gt;&gt; defines a class with a T member whereas <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a>&lt;T, offset_ptr&lt;void&gt; &gt; defines a class with a offset_ptr&lt;T&gt; member. Relies on unqualified calls to:</p>
<p>void intrusive_ptr_add_ref(T * p) BOOST_NOEXCEPT; void intrusive_ptr_release(T * p) BOOST_NOEXCEPT;</p>
<p>with (p != 0)</p>
<p>The object is responsible for destroying itself. </p>
<div class="refsect2">
<a name="id-1.3.16.19.3.49.4.4.6"></a><h3>
<a name="id63-bb"></a><code class="computeroutput">intrusive_ptr</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a3b062402a4f97267f3d5f6d02572d1da"></a><span class="identifier">intrusive_ptr</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Constructor. Initializes internal pointer to 0. Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a9d8a78cba6f87c3479c9d046832201f6"></a><span class="identifier">intrusive_ptr</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span> <span class="special">&amp;</span> p<span class="special">,</span> <span class="keyword">bool</span> add_ref <span class="special">=</span> <span class="keyword">true</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Constructor. Copies pointer and if "p" is not zero and "add_ref" is true calls intrusive_ptr_add_ref(to_raw_pointer(p)). Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a641487a6128954bc6852987e731a0383"></a><span class="identifier">intrusive_ptr</span><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="keyword">const</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Copy constructor. Copies the internal pointer and if "p" is not zero calls intrusive_ptr_add_ref(to_raw_pointer(p)). Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a3dd69761f4ec2a6fa5558152cd7424c6"></a><span class="identifier">intrusive_ptr</span><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;&amp;</span> rhs<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Move constructor. Moves the internal pointer. Does not throw. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> 
  <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1aaa3f512bbda87d40b0ce835fc2bf1548"></a><span class="identifier">intrusive_ptr</span><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">VP</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Constructor from related. Copies the internal pointer and if "p" is not zero calls intrusive_ptr_add_ref(to_raw_pointer(p)). Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a3ed6cfcd094205ffe569472d8bae51f3"></a><span class="special">~</span><span class="identifier">intrusive_ptr</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Destructor. Calls <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1ac1ffa4a3578eb390ee36368687052d28">reset()</a>. Does not throw. </li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a5ac3ec09d78dc56855b1d4656d5ca95c"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="identifier">BOOST_COPY_ASSIGN_REF</span><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a><span class="special">)</span> rhs<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Assignment operator. Equivalent to intrusive_ptr(r).swap(*this). Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1ac84d23bf38a020c1d44611f52a2f1976"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;&amp;</span> rhs<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Move Assignment operator Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> U<span class="special">&gt;</span> 
  <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a2502f5c7f5e962b4b7005b29b76f7cf2"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a><span class="special">&lt;</span> <span class="identifier">U</span><span class="special">,</span> <span class="identifier">VP</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Assignment from related. Equivalent to intrusive_ptr(r).swap(*this). Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a5476c22b7af008da57d744e8a52e1d32"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="identifier">pointer</span> rhs<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Assignment from pointer. Equivalent to intrusive_ptr(r).swap(*this). Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1ac1ffa4a3578eb390ee36368687052d28"></a><span class="identifier">reset</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Release internal pointer and set it to 0. If internal pointer is not 0, calls intrusive_ptr_release(to_raw_pointer(m_ptr)). Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">pointer</span> <span class="special">&amp;</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1aac625d6cbb898c0b754f13f49fc0961e"></a><span class="identifier">get</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Returns a reference to the internal pointer. Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <span class="identifier">pointer</span> <span class="special">&amp;</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a35ad6abe1a924602938f6c02a94a72a8"></a><span class="identifier">get</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Returns a reference to the internal pointer. Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">T</span> <span class="special">&amp;</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a191709e971e939833998ee754329b025"></a><span class="keyword">operator</span><span class="special">*</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Returns *get(). Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">const</span> <span class="identifier">pointer</span> <span class="special">&amp;</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1adeb444405c954b83524b181a8b8ef957"></a><span class="keyword">operator</span><span class="special">-&gt;</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Returns *get(). Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">pointer</span> <span class="special">&amp;</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a506ca35c6bbaeb90616b2b72f63f1a53"></a><span class="keyword">operator</span><span class="special">-&gt;</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Returns <a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html#doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1aac625d6cbb898c0b754f13f49fc0961e">get()</a>. Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a6cbd046b6639ba32b21ab78b82cfb1a2"></a><span class="keyword">operator</span> <span class="identifier">unspecified_bool_type</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Conversion to boolean. Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a4e1db57f5eedfbf20bf400bd1f293f67"></a><span class="keyword">operator</span><span class="special">!</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Not operator. Does not throw </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_interprocess_header_reference.classboost_1_1interprocess_1_1intrusive__ptr_1a9122b4d287f62a0a22a425189b37af28"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="classboost_1_1interprocess_1_1intrusive__ptr.html" title="Class template intrusive_ptr">intrusive_ptr</a> <span class="special">&amp;</span> rhs<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Exchanges the contents of the two smart pointers. Does not throw </p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2005-2024 Ion Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1interprocess_1_1deleter.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interprocess/indexes_reference.html#doxygen.boost_interprocess_header_reference.intrusive__ptr_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="intrusive__ptr_8hpp_1ad07d21c7071ac564f4a3b29a3128c871.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
